<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222"><meta name="generator" content="Hexo 6.3.0">


  <link rel="apple-touch-icon" sizes="180x180" href="/myblog/images/apple-touch-icon.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/myblog/images/favicon-32x32.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/myblog/images/favicon-16x16.png">
  <link rel="mask-icon" href="/myblog/images/logo.svg" color="#222">

<link rel="stylesheet" href="/myblog/css/main.css">

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Monda:300,300italic,400,400italic,700,700italic%7CRoboto+Slab:300,300italic,400,400italic,700,700italic%7CNoto+Serif+SC:300,300italic,400,400italic,700,700italic%7CAmita:300,300italic,400,400italic,700,700italic%7CMontserrat:300,300italic,400,400italic,700,700italic%7CPT+Mono:300,300italic,400,400italic,700,700italic&display=swap&subset=latin,latin-ext">

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css" integrity="sha256-AbA177XfpSnFEvgpYu1jMygiLabzPCJCRIBtR5jGc0k=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"wang-chen1119.gitee.io","root":"/myblog/","images":"/myblog/images","scheme":"Pisces","darkmode":false,"version":"8.13.1","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":{"enable":false,"style":null},"bookmark":{"enable":true,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"}}</script><script src="/myblog/js/config.js"></script>

    <meta name="description" content="操作系统第一章 操作系统的概念">
<meta property="og:type" content="blog">
<meta property="og:title" content="操作系统学习笔记(一):操作系统的基本知识介绍">
<meta property="og:url" content="http://wang-chen1119.gitee.io/myblog/2022/10/28/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0(%E4%B8%80)%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%9A%84%E5%9F%BA%E6%9C%AC%E7%9F%A5%E8%AF%86%E4%BB%8B%E7%BB%8D/index.html">
<meta property="og:site_name" content="Yorn&#39;s Notes">
<meta property="og:description" content="操作系统第一章 操作系统的概念">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://image-1305623006.cos.ap-nanjing.myqcloud.com/img/202210281338663.png">
<meta property="og:image" content="https://image-1305623006.cos.ap-nanjing.myqcloud.com/img/202210281338127.png">
<meta property="og:image" content="https://image-1305623006.cos.ap-nanjing.myqcloud.com/img/202210281338821.png">
<meta property="og:image" content="https://image-1305623006.cos.ap-nanjing.myqcloud.com/img/202210281338846.png">
<meta property="og:image" content="https://image-1305623006.cos.ap-nanjing.myqcloud.com/img/202210281339369.png">
<meta property="og:image" content="https://image-1305623006.cos.ap-nanjing.myqcloud.com/img/202210281339131.png">
<meta property="og:image" content="https://image-1305623006.cos.ap-nanjing.myqcloud.com/img/202210281339277.png">
<meta property="og:image" content="https://image-1305623006.cos.ap-nanjing.myqcloud.com/img/202210281339264.png">
<meta property="og:image" content="https://image-1305623006.cos.ap-nanjing.myqcloud.com/img/202210281339498.png">
<meta property="og:image" content="https://image-1305623006.cos.ap-nanjing.myqcloud.com/img/202210281339387.png">
<meta property="article:published_time" content="2022-10-28T05:41:31.595Z">
<meta property="article:modified_time" content="2022-10-28T06:21:02.605Z">
<meta property="article:author" content="yorn">
<meta property="article:tag" content="操作系统">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://image-1305623006.cos.ap-nanjing.myqcloud.com/img/202210281338663.png">


<link rel="canonical" href="http://wang-chen1119.gitee.io/myblog/2022/10/28/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0(%E4%B8%80)%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%9A%84%E5%9F%BA%E6%9C%AC%E7%9F%A5%E8%AF%86%E4%BB%8B%E7%BB%8D/">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":true,"permalink":"http://wang-chen1119.gitee.io/myblog/2022/10/28/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0(%E4%B8%80)%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%9A%84%E5%9F%BA%E6%9C%AC%E7%9F%A5%E8%AF%86%E4%BB%8B%E7%BB%8D/","path":"2022/10/28/操作系统学习笔记(一)操作系统的基本知识介绍/","title":"操作系统学习笔记(一):操作系统的基本知识介绍"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>操作系统学习笔记(一):操作系统的基本知识介绍 | Yorn's Notes</title>
  






  <noscript>
    <link rel="stylesheet" href="/myblog/css/noscript.css">
  </noscript>
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/myblog/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">Yorn's Notes</p>
      <i class="logo-line"></i>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-首页"><a href="/myblog/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a></li><li class="menu-item menu-item-关于"><a href="/myblog/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a></li><li class="menu-item menu-item-标签"><a href="/myblog/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a></li><li class="menu-item menu-item-分类"><a href="/myblog/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a></li>
  </ul>
</nav>




</div>
        
  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>

  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F"><span class="nav-number">1.</span> <span class="nav-text">操作系统</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E7%AC%AC%E4%B8%80%E7%AB%A0"><span class="nav-number">1.1.</span> <span class="nav-text">第一章</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%9A%84%E6%A6%82%E5%BF%B5"><span class="nav-number">1.1.1.</span> <span class="nav-text">操作系统的概念</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%9A%84%E5%8A%9F%E8%83%BD%E5%92%8C%E7%9B%AE%E6%A0%87"><span class="nav-number">1.1.2.</span> <span class="nav-text">操作系统的功能和目标</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%9A%84%E7%89%B9%E5%BE%81"><span class="nav-number">1.1.3.</span> <span class="nav-text">操作系统的特征</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%9A%84%E5%8F%91%E5%B1%95%E4%B8%8E%E5%88%86%E7%B1%BB"><span class="nav-number">1.1.4.</span> <span class="nav-text">操作系统的发展与分类</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%9A%84%E8%BF%90%E8%A1%8C%E6%9C%BA%E5%88%B6%E5%92%8C%E4%BD%93%E7%B3%BB%E7%BB%93%E6%9E%84"><span class="nav-number">1.1.5.</span> <span class="nav-text">操作系统的运行机制和体系结构</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%9A%84%E5%86%85%E6%A0%B8"><span class="nav-number">1.1.6.</span> <span class="nav-text">操作系统的内核</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E4%B8%AD%E6%96%AD%E5%92%8C%E5%BC%82%E5%B8%B8"><span class="nav-number">1.1.7.</span> <span class="nav-text">中断和异常</span></a><ol class="nav-child"><li class="nav-item nav-level-5"><a class="nav-link" href="#%E4%B8%AD%E6%96%AD%E7%9A%84%E6%A6%82%E5%BF%B5%E5%92%8C%E4%BD%9C%E7%94%A8"><span class="nav-number">1.1.7.1.</span> <span class="nav-text">中断的概念和作用</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#%E4%B8%AD%E6%96%AD%E7%9A%84%E5%88%86%E7%B1%BB"><span class="nav-number">1.1.7.2.</span> <span class="nav-text">中断的分类</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#%E5%A4%96%E4%B8%AD%E6%96%AD%E7%9A%84%E5%A4%84%E7%90%86%E8%BF%87%E7%A8%8B"><span class="nav-number">1.1.7.3.</span> <span class="nav-text">外中断的处理过程</span></a></li></ol></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E7%B3%BB%E7%BB%9F%E8%B0%83%E7%94%A8"><span class="nav-number">1.1.8.</span> <span class="nav-text">系统调用</span></a></li></ol></li></ol></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="yorn"
      src="/myblog/uploads/head.jpg">
  <p class="site-author-name" itemprop="name">yorn</p>
  <div class="site-description" itemprop="description">足够专注才能成功</div>
</div>
<div class="site-state-wrap site-overview-item animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/myblog/archives/">
          <span class="site-state-item-count">53</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/myblog/categories/">
        <span class="site-state-item-count">13</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
          <a href="/myblog/tags/">
        <span class="site-state-item-count">19</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author site-overview-item animated">
      <span class="links-of-author-item">
        <a href="https://github.com/wang-chen1119" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;wang-chen1119" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="mailto:w1905989051@gmail.com" title="E-Mail → mailto:w1905989051@gmail.com" rel="noopener" target="_blank"><i class="fa fa-envelope fa-fw"></i>E-Mail</a>
      </span>
  </div>
  <div class="cc-license site-overview-item animated" itemprop="license">
    <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" class="cc-opacity" rel="noopener" target="_blank"><img src="https://cdnjs.cloudflare.com/ajax/libs/creativecommons-vocabulary/2020.11.3/assets/license_badges/small/by_nc_sa.svg" alt="Creative Commons"></a>
  </div>


  <div class="links-of-blogroll site-overview-item animated">
    <div class="links-of-blogroll-title"><i class="fa fa-globe fa-fw"></i>
      Links
    </div>
    <ul class="links-of-blogroll-list">
        <li class="links-of-blogroll-item">
          <a href="https://blog.csdn.net/qq_51088445" title="https:&#x2F;&#x2F;blog.csdn.net&#x2F;qq_51088445" rel="noopener" target="_blank">CSDN</a>
        </li>
    </ul>
  </div>

        </div>
      </div>
    </div>
  </aside>
  <div class="sidebar-dimmer"></div>


    </header>

    
  <div class="back-to-top" role="button" aria-label="返回顶部">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>
  <div class="reading-progress-bar"></div>
  <a role="button" class="book-mark-link book-mark-link-fixed"></a>

  <a href="https://github.com/wang-chen1119" class="github-corner" title="Follow me on GitHub" aria-label="Follow me on GitHub" rel="noopener" target="_blank"><svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://wang-chen1119.gitee.io/myblog/2022/10/28/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0(%E4%B8%80)%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%9A%84%E5%9F%BA%E6%9C%AC%E7%9F%A5%E8%AF%86%E4%BB%8B%E7%BB%8D/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/myblog/uploads/head.jpg">
      <meta itemprop="name" content="yorn">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Yorn's Notes">
      <meta itemprop="description" content="足够专注才能成功">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content="操作系统学习笔记(一):操作系统的基本知识介绍 | Yorn's Notes">
      <meta itemprop="description" content="">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          操作系统学习笔记(一):操作系统的基本知识介绍
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>
      

      <time title="创建时间：2022-10-28 13:41:31 / 修改时间：14:21:02" itemprop="dateCreated datePublished" datetime="2022-10-28T13:41:31+08:00">2022-10-28</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/myblog/categories/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/" itemprop="url" rel="index"><span itemprop="name">操作系统</span></a>
        </span>
    </span>

  
    <span class="post-meta-break"></span>
    <span class="post-meta-item" title="本文字数">
      <span class="post-meta-item-icon">
        <i class="far fa-file-word"></i>
      </span>
      <span class="post-meta-item-text">本文字数：</span>
      <span>2.3k</span>
    </span>
    <span class="post-meta-item" title="阅读时长">
      <span class="post-meta-item-icon">
        <i class="far fa-clock"></i>
      </span>
      <span class="post-meta-item-text">阅读时长 &asymp;</span>
      <span>2 分钟</span>
    </span>
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
        <h2 id="操作系统"><a href="#操作系统" class="headerlink" title="操作系统"></a>操作系统</h2><h3 id="第一章"><a href="#第一章" class="headerlink" title="第一章"></a>第一章</h3><hr>
<h4 id="操作系统的概念"><a href="#操作系统的概念" class="headerlink" title="操作系统的概念"></a>操作系统的概念</h4><hr>
<p>首先引入计算机系统的层次结构</p>
<p><img src="https://image-1305623006.cos.ap-nanjing.myqcloud.com/img/202210281338663.png" alt="在这里插入图片描述"></p>
<p>此处操作系统的作用有</p>
<blockquote>
<ol>
<li>负责管理协调硬件、软件等计算机资源的工作</li>
</ol>
</blockquote>
<blockquote>
<ol start="2">
<li>为上层的应用程序、用户提供简单易用的服务</li>
</ol>
</blockquote>
<blockquote>
<ol start="3">
<li>操作系统是系统软件，而不是硬件</li>
</ol>
</blockquote>
<p>**操作系统的定义 **</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">操作系统（Operating System OS）:</span><br><span class="line">指控制和管理整个计算机系统的硬件和软件资源，并合理的组织调度计算机的工作和资源的分配，以提供给用户和其他软件的方便的接口和环境，它是计算机系统中的最近的系统软件</span><br></pre></td></tr></table></figure>



<h4 id="操作系统的功能和目标"><a href="#操作系统的功能和目标" class="headerlink" title="操作系统的功能和目标"></a>操作系统的功能和目标</h4><hr>
<p> <strong>1.作为系统资源的管理者</strong></p>
<p><img src="https://image-1305623006.cos.ap-nanjing.myqcloud.com/img/202210281338127.png" alt="在这里插入图片描述"></p>
<p>提供的功能以打开一个qq为例</p>
<p>1.首先找到qq所在路径  （逐层打开文件夹找到QQ这个程序的存放位置  -&gt;文件管理）</p>
<p>2.双击打开qq（需要将该程序的相关数据放入内存 -&gt;存储器管理）</p>
<p>3.qq程序正常运行（对应的进程被处理机CPU处理 -&gt;处理器管理）</p>
<p>4.开始与朋友视频聊天 （设备管理）</p>
<p><strong>2.作为用户和计算机硬件之间的接口</strong></p>
<p><img src="https://image-1305623006.cos.ap-nanjing.myqcloud.com/img/202210281338821.png" alt="img"></p>
<p>[processon 地址](<a target="_blank" rel="noopener" href="https://www.processon.com/mindmap/615d54f71efad4243d472d89">Central Topic (processon.com)</a>)</p>
<p><strong>3.作为最接近硬件的层次</strong></p>
<p>需要提供的功能和目标：实现对硬件机器的拓展</p>
<p>没有任何软件支持的计算机称为裸机</p>
<p>在裸机上安装操作系统可以提供资源管理功能和方便用户的服务功能，将裸机改造成功能更强、使用更方便的机器</p>
<p>类比：</p>
<p>硬件：锤子 锯子 木头 钉子</p>
<p>操作系统 ： 优秀的工匠</p>
<p>通过优秀的工匠，讲这些简单地原材料组织成房子和帆船，共普通用户直接使用</p>
<h4 id="操作系统的特征"><a href="#操作系统的特征" class="headerlink" title="操作系统的特征"></a>操作系统的特征</h4><ol>
<li>并发 ： 在多道程序环境下并发性指宏观上在一段时间内有多道程序在同时运行。</li>
<li>共享 ： 系统中的资源可供内存中多个并发执行的程序共同使用</li>
<li>虚拟 ： 通过某种技术把一个物理实体变成若干个逻辑上的对应物</li>
<li>异步性 ：在多道程序环境下，允许多个程序并发执行</li>
</ol>
<p>并发和共享是操作系统的两个最基本的特征，他们互为存在条件。</p>
<h4 id="操作系统的发展与分类"><a href="#操作系统的发展与分类" class="headerlink" title="操作系统的发展与分类"></a>操作系统的发展与分类</h4><p><strong>发展图</strong></p>
<p><img src="https://image-1305623006.cos.ap-nanjing.myqcloud.com/img/202210281338846.png" alt="在这里插入图片描述"></p>
<p><strong>为什么说多道批处理系统能使资源利用率大幅提升</strong></p>
<p>系统资源并行工作</p>
<p><strong>作业的概念</strong></p>
<p>通常指用户在一次计算过程中或者一次事物处理过程中要求计算机所做的工作的集合，也就是把一次计算过程或者事务处理过程中，从输入开始到输入结束，用户要求计算机所做的全部工作称为作业。</p>
<p><strong>单道批处理操作系统</strong></p>
<p>内存中始终只保持一个作业</p>
<p>主要特征有</p>
<ol>
<li>自动性</li>
<li>顺序性</li>
<li>单道性</li>
</ol>
<p><strong>多道批处理系统</strong></p>
<p>在多道批处理中，用户所提交的作业先存放在外存并排成一个队列，该队列称为“后备队列”；然后，由作业调度程序按一定的算法从后备队列中选择若干个作业调入内存，使它们共享处理机和系统中的各种资源，以达到提高资源利用率和系统吞吐量的目的。</p>
<p>好处：</p>
<ol>
<li>提高处理机的利用率</li>
<li>提高内存和I&#x2F;O设备利用率</li>
<li>增加系统吞吐量</li>
</ol>
<p>特征：</p>
<ol>
<li>多道性</li>
<li>无序性</li>
<li>调度性：作业从提交给系统开始直至完成需要经过两次调度 作业调度，进程调度</li>
</ol>
<p>缺点：</p>
<ol>
<li>平均周转时间长</li>
<li>无交互能力</li>
</ol>
<p><strong>分时系统</strong></p>
<p>特征：</p>
<ol>
<li>多路性</li>
<li>独立性</li>
<li>及时性</li>
<li>交互性</li>
</ol>
<p><strong>实时系统</strong></p>
<p>特征：</p>
<ol>
<li>多路性</li>
<li>独立性</li>
<li>及时性</li>
<li>交互性</li>
<li>可靠性</li>
</ol>
<p><strong>推动操作系统发展的基本动力</strong></p>
<ol>
<li>不断提高计算机资源利用率的需要</li>
<li>方便用户</li>
<li>器件的不断更新换代</li>
<li>计算机体系结构的不断发展</li>
</ol>
<h4 id="操作系统的运行机制和体系结构"><a href="#操作系统的运行机制和体系结构" class="headerlink" title="操作系统的运行机制和体系结构"></a>操作系统的运行机制和体系结构</h4><hr>
<blockquote>
<p>什么是指令？</p>
</blockquote>
<p>代码和指令的区别</p>
<p>C语言代码 —-&gt; 机器语言指令 （一条高级语言的代码翻译过来可能对应多条指令）</p>
<p><strong>指令</strong> :CPU能够识别和执行的最基本命令</p>
<ul>
<li>两种指令：<ul>
<li>特权指令</li>
<li>非特权指令</li>
</ul>
</li>
<li>两种状态<ul>
<li>核心态</li>
<li>用户态</li>
</ul>
</li>
<li>两种程度<ul>
<li>内核程序 :系统的管理者，即可执行特权指令，也可以执行非特权指令，运行在核心态</li>
<li>应用程序：为了保证系统能安全运行，普通应用程序只能执行非特权指令，运行在用户态</li>
</ul>
</li>
</ul>
<h4 id="操作系统的内核"><a href="#操作系统的内核" class="headerlink" title="操作系统的内核"></a>操作系统的内核</h4><p>内核是计算机上配置的底层软件，是操作系统最基本 最核心的部分</p>
<p>实现操作系统内核功能的那些程序就是内核程序</p>
<p><img src="https://image-1305623006.cos.ap-nanjing.myqcloud.com/img/202210281339369.png"></p>
<h4 id="中断和异常"><a href="#中断和异常" class="headerlink" title="中断和异常"></a>中断和异常</h4><blockquote>
<p>本质：</p>
<p>发生中断就意味着需要操作系统介入，开展管理工作</p>
</blockquote>
<h5 id="中断的概念和作用"><a href="#中断的概念和作用" class="headerlink" title="中断的概念和作用"></a>中断的概念和作用</h5><ol>
<li>当中断发生时，CPU立即进入核心态</li>
<li>当中断发生后，当前运行的进程暂停运行，并由操作系统内核对中断进行处理</li>
<li>对于不同的中断信号会进行不同的处理</li>
<li>有了中断才能实现多道程序并发执行</li>
</ol>
<p> :question: <font color=#FF0000>用户态核心态之间的切换是怎么实现的?</font></p>
<p>用户态-&gt;核心态 是通过中断实现的，而且中断是唯一途径</p>
<p>核心态-&gt;用户态 是通过执行一个特权指令，将程序状态字（PSW）的标志位设置为用户态</p>
<h5 id="中断的分类"><a href="#中断的分类" class="headerlink" title="中断的分类"></a>中断的分类</h5><p><img src="https://image-1305623006.cos.ap-nanjing.myqcloud.com/img/202210281339131.png" alt="在这里插入图片描述"></p>
<p><img src="https://image-1305623006.cos.ap-nanjing.myqcloud.com/img/202210281339277.png" alt="在这里插入图片描述"></p>
<h5 id="外中断的处理过程"><a href="#外中断的处理过程" class="headerlink" title="外中断的处理过程"></a>外中断的处理过程</h5><ol>
<li>执行完每个指令之后，CPU都要检查当前是否有外部中断信号</li>
<li>如果测试到外部中断信号，则需要保护被中断进程的CPU环境（如程序状态PSW 程序计数器PC 各种通用寄存器）</li>
<li>根据中断信号类型转入相应的中断处理程序</li>
<li>恢复原进程的CPU环境并退出中断，返回原进程继续往下执行</li>
</ol>
<h4 id="系统调用"><a href="#系统调用" class="headerlink" title="系统调用"></a>系统调用</h4><p> :question:<font color="#ff000">操作系统为什么要提供“系统调用功能”？</font></p>
<blockquote>
<p><font color="121a2a" size="3px">应用程序通过系统调用请求操作系统的服务。系统中的各种共享资源都由操作系统统一掌管，因此在用户程序中，凡是与资源相关的操作（如存储分配  I&#x2F;O操作  文件管理等），都必须通过系统调用的方式向操作系统提出服务请求，由操作系统代为完成。这样可以保证系统的稳定性和安全性，防止用户进行非法操作。</font></p>
</blockquote>
<p><strong>系统调用分类</strong></p>
<p><img src="https://image-1305623006.cos.ap-nanjing.myqcloud.com/img/202210281339264.png" alt="在这里插入图片描述"></p>
<p><strong>系统调用与库函数的区别</strong></p>
<p><img src="https://image-1305623006.cos.ap-nanjing.myqcloud.com/img/202210281339498.png" alt="在这里插入图片描述"></p>
<p>不涉及系统调用的库函数： 取绝对值 一些数学函数</p>
<p>设计系统调用的库函数： 创建文件的函数</p>
<p><strong>系统调用的背后</strong></p>
<p><img src="https://image-1305623006.cos.ap-nanjing.myqcloud.com/img/202210281339387.png" alt="在这里插入图片描述"></p>
<p>传递系统调用参数 –&gt; 执行陷入指令(用户态) –&gt; 执行系统调用的相应服务程序（核心态）–&gt;返回用户程序</p>
<blockquote>
<p>注意：</p>
<ol>
<li>陷入指令是在用户态执行的，执行陷入指令之后立即引发一个内中断，从而是CPU进入核心态</li>
<li>发出系统调用请求是在用户态，而对系统调用的相应操作是在核心态下进行</li>
<li>陷入指令是唯一一个只能在用户态执行，而不可在核心态执行的指令</li>
</ol>
</blockquote>
<p>学习资料： [王道操作系统视频](<a target="_blank" rel="noopener" href="https://www.bilibili.com/video/BV1YE411D7nH?from=search&seid=5751322584829689686&spm_id_from=333.337.0.0">王道计算机考研 操作系统_哔哩哔哩_bilibili</a>)</p>
<p><strong>操作系统 第四版 刘振鹏 张明 王煜著</strong></p>

    </div>

    
    
    

    <footer class="post-footer">
          

<div class="post-copyright">
<ul>
  <li class="post-copyright-author">
      <strong>本文作者： </strong>yorn
  </li>
  <li class="post-copyright-link">
      <strong>本文链接：</strong>
      <a href="http://wang-chen1119.gitee.io/myblog/2022/10/28/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0(%E4%B8%80)%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%9A%84%E5%9F%BA%E6%9C%AC%E7%9F%A5%E8%AF%86%E4%BB%8B%E7%BB%8D/" title="操作系统学习笔记(一):操作系统的基本知识介绍">http://wang-chen1119.gitee.io/myblog/2022/10/28/操作系统学习笔记(一)操作系统的基本知识介绍/</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" rel="noopener" target="_blank"><i class="fab fa-fw fa-creative-commons"></i>BY-NC-SA</a> 许可协议。转载请注明出处！
  </li>
</ul>
</div>

          <div class="post-tags">
              <a href="/myblog/tags/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/" rel="tag"><i class="fa fa-tag"></i> 操作系统</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/myblog/2022/10/27/128%E9%99%B7%E9%98%B1/" rel="prev" title="128陷阱">
                  <i class="fa fa-chevron-left"></i> 128陷阱
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/myblog/2022/10/28/%E5%AD%98%E5%82%A8%E5%99%A8%E7%AE%A1%E7%90%86/" rel="next" title="操作系统学习笔记(五):存储器管理">
                  操作系统学习笔记(五):存储器管理 <i class="fa fa-chevron-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">


<div class="copyright">
  &copy; 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">yorn</span>
</div>

    </div>
  </footer>

  
  <script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
<script src="/myblog/js/comments.js"></script><script src="/myblog/js/utils.js"></script><script src="/myblog/js/motion.js"></script><script src="/myblog/js/next-boot.js"></script><script src="/myblog/js/bookmark.js"></script>

  





  





<script src="/myblog/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"log":false,"pluginJsPath":"lib/","pluginModelPath":"assets/","pluginRootPath":"live2dw/","tagMode":false});</script></body>
</html>
